#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@author: yuejl
@application:
@contact: lewyuejian@163.com
@file: api_client_host.py
@time: 2021/8/22 0022 17:43
@desc:
'''
from common.base.load_api_config import LoadApiConfig
from common.httpclient import HttpClient

class ReadclientHost(object):
    __instance = None
    __inited = None

    def __new__(cls, *args, **kwargs):
        if cls.__instance is None:
            cls.__instance = object.__new__(cls)
        return cls.__instance

    def __init__(self):
        if self.__inited is None:
            self.apiClientConfig = LoadApiConfig().config
            print(self.apiClientConfig.url)
            #self.demoProjectDBClients = API_DemoProject_DB_Clients()
            self.doRequest = HttpClient(self.apiClientConfig.url)

            self.__inited = True